import test.Draw;
import test.MyPanel;

import javax.swing.*;
import java.awt.*;

public class GamePanel extends JLayeredPane {
    SnakePanel snakePanel;
    FoodPanel foodPanel;

    public GamePanel() {
        //add(new RootPanel(), DEFAULT_LAYER);

        snakePanel = new SnakePanel();//2
        setSnakePanel(snakePanel);
        add(snakePanel, Integer.valueOf(0));

        foodPanel = new FoodPanel();//0
        setFoodPanel(foodPanel);
        add(foodPanel, Integer.valueOf(250));

        HelloPanel helloPanel = new HelloPanel();//1
        add(helloPanel, Integer.valueOf(270));
        //System.out.println(getIndexOf(helloPanel));
    }

    public FoodPanel getFoodPanel() {
        return foodPanel;
    }

    public void setFoodPanel(FoodPanel foodPanel) {
        this.foodPanel = foodPanel;
    }

    public SnakePanel getSnakePanel() {
        return snakePanel;
    }

    public void setSnakePanel(SnakePanel snakePanel) {
        this.snakePanel = snakePanel;
    }


}
